

/**
 * From QT source code
 */

#ifndef M3D_TIME_H_
#define M3D_TIME_H_

#include <sys/time.h>
#include <time.h>
#include "m3d.h"

M3D_BEGIN_NAMESPACE

/***********************************/
/************ MTime ************/
/***********************************/

class MTime 
{
public:

    MTime(): mds(-1) {}

    MTime addMSecs(int ms) const;
    int msecsTo(const MTime &) const;

    static MTime currentTime();

    void start();
    int restart();
    int elapsed() const;


private:
	inline int ds() const { return mds == -1 ? 0 : mds; }
    int mds;
};



M3D_END_NAMESPACE

#endif /* M3D_POINT_H_ */
